home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / PAS_0793 / NAPLPS.INF < prev    next >
Text File  |  1993-07-15  |  7KB  |  223 lines

  1. ─ Fido Pascal Conference ────────────────────────────────────────────── PASCAL ─
  2. Msg  : 214 of 228                                                               
  3. From : Warren Zatwarniski                  1:140/111.0          14 Jul 93  22:45 
  4. To   : All                                                                       
  5. Subj : (1/2) NAPLPS - INFO                                                    
  6. ────────────────────────────────────────────────────────────────────────────────
  7. Documentation (kind of) on NAP_DRAW.PAS 
  8.  
  9. Hopefully this will provide enough information that you will be able to use the
  10. NAP_DRAW.PAS unit, and also make any needed modifications to the program. 
  11.  
  12. Function N_Point (Xcoord, Ycoord : Integer) : String;
  13.  
  14. First when doing a point, the (x,y) coordinates are combined to form one byte. 
  15. Each one uses 3 bits of a byte.
  16.  
  17. +-+-+-+-+-+-+-+-+   If using 7-but graphics the x is a 0, 
  18. |x|1| | | | | | |   and in 8-bit graphics the x is a 1.
  19. +-+-+-+-+-+-+-+-+   My unit is for 8 bit NAPLPS graphics only.
  20.      ^^^^^ ^^^^^
  21.    X     Y
  22.  
  23. And each (x,y) coordinate can have upto 8 bytes linked together. Each byte
  24. divided into 3 bits for the x, and 3 for the y. The NAPLPS screen is normally
  25. divided in a "grid" of 255x255. To pick one of the 255 possible coordinates in 
  26. each directon, I only use 3 bytes. The first bit for the x and y value is for a
  27. positive or negative co-ordinate. 
  28.  
  29.  
  30. Function N_SelectColor (Color : Byte) : String;
  31.  
  32. For the select color command, you can use 1 to 4 bytes. Each containing 6 bits 
  33. of information.
  34.  
  35.      MSB
  36.      v
  37. +-+-+-+-+-+-+-+-+ 
  38. |x|1| | | | | | |
  39. +-+-+-+-+-+-+-+-+
  40.                ^LSB
  41.  
  42. With my function you can specify up to 256 colors. With one byte you can
  43. specify up to 64 colors, and to use more you have to change the value of LSO to
  44. 2 so the procedures will know that you need 2 bytes. You also need to change
  45. the value of Xcolor to the number of colors you will use. This is so the most
  46. significant bit (MSB) will be calculate right.
  47.  
  48.  
  49. Function N_SetColor(Green, Red, Blue : Real) : String;
  50.  
  51. +-+-+-+-+-+-+-+-+  You can use 1-8 bytes for color.
  52. |x|1|G|R|B|G|R|B|
  53. +-+-+-+-+-+-+-+-+
  54.  
  55. To define a color, you specify the amounts of green, red and blue you want. A
  56. byte contains 2 bits of each color. With my function, decimal values are
  57. allowed and you can specify color values from 0 to 7. 
  58.  
  59. Function N_Domain : String;
  60.  
  61. +-+-+-+-+-+-+-+-+  
  62. |x|1|D|M|M|M|S|S| - See below
  63. +-+-+-+-+-+-+-+-+
  64.  
  65. +-+-+-+-+-+-+-+-+
  66. |x|1| | | | | | | - Logical Pel Size
  67. +-+-+-+-+-+-+-+-+
  68.      ^^^^^ ^^^^^
  69.        X     Y
  70.  
  71. D - Dimensions. 
  72.    0 is 2-dimensional, 1 is three dimensional. 
  73.    My functions only allow for 2 dimensions. So this must be   
  74.    set to 0.
  75.  
  76. MMM - Length of Multivalue Operands.
  77.  
  78. 000 = 1
  79. 001 = 2
  80. 010 = 3 (default)
  81. 011 = 4
  82. 100 = 5
  83. 101 = 6
  84. 110 = 7
  85. 111 = 8
  86.  
  87. SS - Length of Single-value Operands
  88. 00 = 1 (default)
  89. 01 = 2
  90. 10 = 3
  91. 11 = 4
  92.  
  93. The domain is used to control the size of data operands. It is made up of a
  94. fixed format operand followed by a multibyte operand. The multivalue operand is
  95. used to control the size of the logical drawing point. To change any of these
  96. valued you must change the following variable and make a call to N_domain.
  97.  
  98.    LMO        - Default = 3
  99.    LSO        - Default = 1
  100.    PelSize.X  - Default = 1
  101.    PelSize.Y  - Default = 1
  102.  
  103. ... Press [ESC] to detonate or any other key to explode .
  104. ---
  105.   Blue Wave/QWK v2.11 
  106.                                
  107.  
  108. --- TurBoard v1.20
  109.  * Origin: NAPLPS Grafx * LCD/Herc/CGA/EGA/VGA & MORE! 9600 HST (1:140/111)
  110.  
  111. ─ Fido Pascal Conference ────────────────────────────────────────────── PASCAL ─
  112. Msg  : 215 of 228                                                               
  113. From : Warren Zatwarniski                  1:140/111.0          14 Jul 93  22:45 
  114. To   : All                                                                       
  115. Subj : (2/2) NAPLPS - INFO                                                    
  116. ────────────────────────────────────────────────────────────────────────────────
  117. Function N_Reset (Color, Mode : Byte; D, T, F, U, X, M, R : Boolean) : String;
  118.  
  119. +-+-+-+-+-+-+-+-+
  120. |x|1|B|B|B|C|C|D| 
  121. +-+-+-+-+-+-+-+-+
  122. +-+-+-+-+-+-+-+-+
  123. |x|1|R|M|X|U|F|T| 
  124. +-+-+-+-+-+-+-+-+
  125.  
  126. The Reset is made up of 2 bytes. 
  127.  
  128. BBB - Color
  129. 000 = No action
  130. 001 = Physical display area to nominal black
  131. 010 = Physical display area to current drawing color
  132. 011 = Border area to nominal black
  133. 100 = Border area to current drawing color
  134. 101 = Physical display area and border area to current drawing color
  135. 110 = Physical display area to current drawing color, and border area to 
  136.       nominal black
  137. 111 = Physical display area and border area to nominal black
  138.  
  139. CCC - Color mode
  140. 00  = No action
  141. 01  = Select color mode 0, set color map to default colors, and set the 
  142.       in use drawing color to white.
  143. 10  = Select color mode 1 and set color map to default colors. 
  144. 11  = Select color mode 1, set color map to default color, and set the
  145.       in-use drawing color to white.
  146.  
  147. D - Domain
  148. T - Text
  149. F - Blink
  150. U - Unprotected fields
  151. X - Texture
  152. M - Macro
  153. R - DRCS
  154.  
  155. This function is used to clear the screen and initialize the attributes. The D,
  156. T, F, U, X, M, R, are all set to TRUE if you want to reset them. 
  157.  
  158.  
  159. Function N_Text (XSize,YSize : Byte) : String;
  160.  
  161. This function is used to set up text size, rotation, path, spacing...etc. I
  162. have outlined what each of the bits mean bellow.
  163.  
  164. +-+-+-+-+-+-+-+-+
  165. |x|1|I|I|P|P|R|R| 
  166. +-+-+-+-+-+-+-+-+
  167. +-+-+-+-+-+-+-+-+
  168. |x|1|C|C|M|M|S|S| 
  169. +-+-+-+-+-+-+-+-+
  170. +-+-+-+-+-+-+-+-+
  171. |x|1| | | | | | |    - Text size
  172. +-+-+-+-+-+-+-+-+
  173.      ^^^^^ ^^^^^
  174.        X     Y
  175.  
  176. II - Intercharacter Spacing
  177. 00 = 1 (default value)
  178. 01 = 1.25 
  179. 10 = 1.5
  180. 11 = Proportional spacing
  181.  
  182. PP - Character Path
  183. 00 - Right
  184. 01 - Left
  185. 10 - Up
  186. 11 - Down
  187.  
  188. RR - Rotation
  189. 00 = 0 (default)
  190. 01 = 90
  191. 10 = 180
  192. 11 = 270
  193.  
  194. CC - Cursor Style
  195. 00 = Underscore (default)
  196. 01 = Block
  197. 10 = Cross-hair
  198. 11 = Custom
  199.  
  200. MM - Move atributes
  201. 00 = Move together (default)
  202. 01 = Cursor leads
  203. 10 = Drawing point leads
  204. 11 = Moving independently
  205.  
  206. SS - Interrow Spacing
  207. 00 = 1 (default)
  208. 01 = 1.25
  209. 10 = 1.5
  210. 11 = 2
  211.  
  212. Decimal text sizes should also be allowed. My function only uses integers
  213. however. 
  214.  
  215. ... To me, "due tomorrow" means just that: Do tomorrow.
  216. ---
  217.   Blue Wave/QWK v2.11 
  218.                                                            
  219.  
  220. --- TurBoard v1.20
  221.  * Origin: NAPLPS Grafx * LCD/Herc/CGA/EGA/VGA & MORE! 9600 HST (1:140/111)
  222.  
  223.